package org.instanceo;

public class Animal{
    public void speak(){
        System.out.println("动物发出叫声");
    }
}
class Cat extends Animal{
    @Override
    public void speak(){
        System.out.println("小猫：喵喵……");
    }
}
class Dog extends Animal{
    @Override
    public void speak(){
        System.out.println("小狗：汪汪……");
    }
    public void houseKeep(){
        System.out.println("狗狗会看家");
    }
}